<?php

namespace app\admin\validate;

use think\Validate;

/**
 * 班级验证器
 */
class Classes extends Validate
{
    protected $rule = [
        'class_name'           => 'require|unique:Classes',
        'start_date'           => 'require',
        'end_date'             => 'require',
        'max_person'           => 'require'
    ];

    protected $message = [
        'class_name.require'         => '请输入班级名称',
        'class_name.unique'          => '班级名称已存在',
        'start_date.require'         => '请选择开班日期',
        'end_date.require'           => '请选择结课日期',
        'max_person.require'         => '请输入班级最大人数'
    ];
}